package com.qs.controller;


import com.qs.response.Response;
import com.qs.service.INoticeService;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 公告接口
 * @author author
 * @since 2024-03-23
 */
@Slf4j
@CrossOrigin
@RestController
@RequestMapping("/notice")
@RequiredArgsConstructor
public class NoticeController {

    private final INoticeService noticeService;

    /**
     * 获取首页公告数据
     * @return
     */
    @GetMapping("/list")
    public Response getIndexNotices(){
        log.info("获取首页公告数据请求.........");
        List<String> list = noticeService.findIndexNotices();
        log.info("获取首页公告数据请求成功.........");
        return Response.success(list);
    }

}
